package com.tengju.data.domain.model.report;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
@Getter
public enum DateConfigTypeEnum {

    DATA_SETTLEMENT_INTERVAL(1,"数据结算周期"),

    DATA_SETTLEMENT_DATE(2,"数据结算日期"),

    BONUS_ENTER_DATE(3,"补贴入账日期");

    private Integer type;

    private String desc;

    public static DateConfigTypeEnum fromType(Integer type) {

        return Arrays.stream(DateConfigTypeEnum.values())
                .filter(v -> v.getType().equals(type))
                .findFirst().orElse(null);

    }
}
